package com.zb.mobile.user.service;

import com.zb.entity.AccounLoginInfo;
import com.zb.entity.AccountLoginToken;
import com.zb.exception.SMSException;
import com.zb.vo.UserLoginVo;

import javax.security.auth.login.LoginException;
import java.util.Map;

/**
 * @Author WEN
 * @Date 2023/10/31 0031
 **/
public interface ConUserMobileService {
    /**
     * 用户移动端登录
     *
     * @param custAccId 商家ID
     * @param loginVo   登录信息
     * @return
     */
    AccountLoginToken login(Long custAccId, UserLoginVo loginVo) throws LoginException, SMSException;

    /**
     * 刷新登录Token
     * @param refreshToken
     * @return
     */
    AccountLoginToken refreshToken(String refreshToken) throws LoginException;

    /**
     * 获取当前客户登录信息
     * @param userId 客户ID
     * @return
     */
    Map<String, Object> getUerDetail(Long userId);

    /**
     * 注销账号
     * @param loginInfo
     */
    void cancelAccount(AccounLoginInfo loginInfo);
}
